//调用接口配置文件
import { request } from 'config/request'
export async function formTemplatesList(params) {
    return request({
        url: 'admin/questionForm/list',
        method: 'POST',
        data: params,
    });
};
export async function getNewsDetail(params) {
    return request({
        url: 'admin/news/detail',
        method: 'POST',
        data: params,
        headers: {
            "Content-type": "application/json",
        }
    });
};
export async function getHouseList(params) {
    return request({
        url: '/admin/estate/list',
        method: 'POST',
        data: params,
        headers: {
            "Content-type": "application/json",
        }
    });
};
//获取标签
export async function labelQueryList(params) {
    return request({
        url: 'admin/label/queryList',
        method: 'POST',
        data: params,
        headers: {
            "Content-type": "application/json",
        }
    });
};
//获取级联列表
export async function parentCode(params) {
    return request({
        url: 'admin/address/queryAllAddress',
        method: 'GET',
        data: params,
    });
};
//获取楼盘列表
export async function getEstateList(params) {
    return request({
        url: 'admin/estate/adminList',
        method: 'POST',
        data: params,
        headers: {
            "Content-type": "application/json"
        },
    });
};
//获取楼盘详情
export async function getloudetail(params) {
    return request({
        url: 'admin/estate/detail',
        method: 'GET',
        data: params,
    });
};
export async function submit(params) {
    return request({
        url: 'admin/news/create', //admin/news/create
        method: 'POST',
        data: params,
        headers: {
            "Content-type": "application/json",
        }
    });
};
export async function update(params) {
    return request({
        url: 'admin/news/update',
        method: 'POST',
        data: params,
        headers: {
            "Content-type": "application/json",
        }
    });
};
export async function deleteDetail(params) {
    return request({
        url: 'admin/news/delete',
        method: 'POST',
        data: params,
        headers: {
            "Content-type": "application/json",
        }
    });
};
export async function getMember(params) {
    // ;
    return request({
        url: 'admin/activity/activtyDetail',
        method: 'POST',
        data: params
    });
};
export async function downLoadFile(params) {
    // ;
    return request({
        url: `admin/activity/export/${params.activityId}`,
        method: 'GET',
        data: params
    });
};

//获取优惠券列表
export async function getCouponsList(params) {
    // ;
    return request({
        url: `admin/coupons/config/list`,
        method: 'POST',
        data: params
    });
};
//获取直播列表
export async function getliveStreamingList(params) {
    // ;
    return request({
        url: `admin/liveBroadcast/queryList`,
        method: 'POST',
        data: params
    });
};
//获取活动列表
export async function getactiveList(params) {
    // ;
    return request({
        url: `admin/news/list?channel`,
        method: 'POST',
        data: params
    });
};
//城市与区域级联
export async function regionArea(params) {

    return request({
        url: `admin/common/region/area/tree/get `,
        method: 'GET',
        data: params,
        headers: {
            "Content-type": "application/json",
        }
    });
};
// 保存活动专区
export async function keepActiveAerea(params) {

    return request({
        url: `admin/activityArea/createOrUpdate `,
        method: 'post',
        data: params,
        headers: {
            "Content-type": "application/json",
        }
    });
};
// 保存并发布活动专区
export async function saveAndPublish(params) {

    return request({
        url: `admin/activityArea/createOrUpdateStatus `,
        method: 'post',
        data: params,
        headers: {
            "Content-type": "application/json",
        }
    });
};
// 取消发布
export async function unpublish(params) {
    return request({
        url: `admin/activityArea/cancelSend `,
        method: 'post',
        data: params,
        headers: {
            "Content-type": "application/json",
        }
    });
};
// 详情数据
export async function getdetails(params) {
    return request({
        url: `admin/activityArea/detail `,
        method: 'post',
        data: params,
        headers: {
            "Content-type": "application/json",
        }
    });
};
// 获取优惠券详情
export async function getyouhui(params) {
    return request({
        url: 'admin/coupons/config/retrieve',
        method: 'GET',
        data: params,
    });
};
// 获取直播详情
export async function getliveStreamingDetail(params) {
    return request({
        url: `admin/liveBroadcast/detail/${params.id}`,
        method: 'GET',
        // data: params,
        headers: {
            "Content-type": "application/json",
        }
    });
};
// 删除栏目（编辑状态,不涉及新增）
export async function deleteByColumnInfoId(params) {
    return request({
        url: `admin/activityArea/deleteByColumnInfoId`,
        method: 'post',
        data: params,
        headers: {
            "Content-type": "application/json",
        }
    });
};